package com.ysd.lis.controller.qi;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.qi.QiIndexPatType;
import com.ysd.lis.service.qi.QiIndexPatTypeService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;


/**
 * <p>
 * 病人来源指标设置 前端控制器
 * </p>
 *
 * @author WH
 * @since 2024-08-08
 */
@RestController
@RequestMapping("/api/qi/patType")
public class QiIndexPatTypeController extends BaseController {

    @Autowired
    private QiIndexPatTypeService qiIndexPatTypeService;

    @ApiOperation("获取病人来源")
    @GetMapping("/getPatTypeList")
    public Result getPatTypeList() {
        return qiIndexPatTypeService.getPatTypeList();
    }

    @ApiOperation("维护病人来源指标")
    @PostMapping("/addPatType")
    public Result addPatType(@RequestBody List<QiIndexPatType> qiIndexPatTypes) {
        return qiIndexPatTypeService.addPatType(qiIndexPatTypes);
    }
}
